using System;

namespace SpecificationPatternDemo
{
    public class CompositeSpecification : ISpecification
    {
        public virtual bool IsSatisfiedBy(object candidate)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public ISpecification And(ISpecification other)
        {
            return new AndSpecification(this, other);
        }

        public ISpecification Or(ISpecification other)
        {
            return new OrSpecification(this, other);
        }

        public ISpecification Not(ISpecification other)
        {
            return new NotSpecification(this);
        }
    }
}
